package com.tyqx.hashchainbackend.service;

import com.tyqx.hashchainbean.module.SysRole;
import com.tyqx.hashchainbean.vo.SysRoleVO;
import hashchainutil.common.BackendPage;

import java.util.List;
import java.util.Map;


public interface SysRoleService {

    public SysRole getById(Long roleId) throws Exception;

    /**
     * 查询所有角色
     *
     * @param param
     * @return
     * @throws Exception
     */
    public List<SysRole> getListByMap(Map<String, Object> param) throws Exception;

    public Integer getCountByMap(Map<String, Object> param) throws Exception;

    /**
     * 添加角色
     *
     * @param sysRole
     * @return
     * @throws Exception
     */
    public boolean save(SysRole sysRole) throws Exception;

    /**
     * 修改角色信息
     *
     * @param sysRole
     * @return
     * @throws Exception
     */
    public boolean modify(SysRole sysRole) throws Exception;

    public Integer removeById(Long roleId) throws Exception;

    public BackendPage<List<SysRole>> queryPageByMap(Map<String, Object> param, Integer pageNo, Integer pageSize) throws Exception;

    public List<SysRole> queryRoleKey(Long roleId);

    public List<SysRoleVO> getAllByUserId(Long userId);
}
